﻿<%@ Control Language="C#" ClassName="JournalVoucherFields" %>
<asp:FormView ID="FormView1" runat="server">
    <ItemTemplate>
        <table border="0" cellpadding="3" cellspacing="1" width="100%">
            <tr>
                <td class="literal">
                    <asp:Label ID="lbldataJournalVoucherId" runat="server" Text="Journal Voucher Id:"
                        AssociatedControlID="dataJournalVoucherId" />
                </td>
                <td>
                    <asp:TextBox runat="server" ID="dataJournalVoucherId" Text='<%# Bind("JournalVoucherId") %>'
                        MaxLength="10" CssClass="text-input large-input"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="literal">
                    <asp:Label ID="lbldataJournalVoucherDate" runat="server" Text="Journal Voucher Date:"
                        AssociatedControlID="dataJournalVoucherDate" />
                </td>
                <td>
                    <asp:TextBox runat="server" ID="dataJournalVoucherDate" Text='<%# Bind("JournalVoucherDate", "{0:d}") %>'
                        CssClass="text-input large-input datepicker" MaxLength="11" />
                    <asp:RequiredFieldValidator ID="ReqVal_dataJournalVoucherDate" runat="server" Display="Dynamic"
                        ValidationGroup="Entity" ControlToValidate="dataJournalVoucherDate" ErrorMessage="Required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="literal">
                    <asp:Label ID="lbldataDescription" runat="server" Text="Description:" AssociatedControlID="dataDescription" />
                </td>
                <td>
                    <asp:TextBox runat="server" ID="dataDescription" Text='<%# Bind("Description") %>'
                        MaxLength="100" CssClass="text-input large-input" />
                </td>
            </tr>
            <tr>
                <td class="literal">
                    <asp:Label ID="lbldataJournalVoucherTypeId" runat="server" Text="Journal Voucher Type Id:"
                        AssociatedControlID="dataJournalVoucherTypeId" />
                </td>
                <td>
                    <data:EntityDropDownList runat="server" ID="dataJournalVoucherTypeId" DataSourceID="JournalVoucherTypeIdJournalVoucherTypeDataSource"
                        DataTextField="Description" DataValueField="JournalVoucherTypeId" SelectedValue='<%# Bind("JournalVoucherTypeId") %>'
                        AppendNullItem="true" Required="true" NullItemText="< Please Choose ...>" ErrorText="Required"
                        CssClass="text-input large-input" />
                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="dataJournalVoucherTypeId"
                        ErrorMessage="Required" ValidationGroup="Entity" />
                    <data:JournalVoucherTypeDataSource ID="JournalVoucherTypeIdJournalVoucherTypeDataSource"
                        runat="server" SelectMethod="GetAll" />
                </td>
            </tr>
            <tr>
                <td class="literal">
                    <asp:Label ID="lbldataExchangeRate" runat="server" Text="Exchange Rate:" AssociatedControlID="dataExchangeRate" />
                </td>
                <td>
                    <asp:TextBox runat="server" ID="dataExchangeRate" Text='<%# Bind("ExchangeRate") %>'
                        CssClass="text-input large-input" />
                </td>
            </tr>
            <tr>
                <td class="literal">
                    <asp:Label ID="lbldataAttachFile" runat="server" Text="Attach File:" AssociatedControlID="dataAttachFile" />
                </td>
                <td>
                    <asp:FileUpload runat="server" ID="dataAttachFile" />
                </td>
            </tr>
            <tr>
                <td class="literal">
                    <asp:Label ID="lbldataPreparedBy" runat="server" Text="Prepared By:" AssociatedControlID="dataPreparedBy" />
                </td>
                <td>
                    <data:EntityDropDownList runat="server" ID="dataPreparedBy" DataSourceID="PreparedByInvoiceCheckingUserDataSource"
                        DataTextField="Fullname" DataValueField="UserId" SelectedValue='<%# Bind("PreparedBy") %>'
                        Enabled="False" AppendNullItem="true" Required="false" NullItemText="< Please Choose ...>"
                        CssClass="text-input large-input" />
                    <data:InvoiceCheckingUserDataSource ID="PreparedByInvoiceCheckingUserDataSource"
                        runat="server" SelectMethod="GetAll" />
                </td>
            </tr>
            <tr>
                <td class="literal">
                    <asp:Label ID="lbldataApprovalBy" runat="server" Text="Approval By:" AssociatedControlID="dataApprovalBy" />
                </td>
                <td>
                    <data:EntityDropDownList runat="server" ID="dataApprovalBy" DataSourceID="ApprovalByUserDataSource"
                        DataTextField="Fullname" DataValueField="UserId" SelectedValue='<%# Bind("ApprovalBy") %>'
                        AppendNullItem="true" Required="True" RequiredErrorMessage="Required" NullItemText="< Please Choose ...>"
                        CssClass="text-input large-input" />
                    <asp:RequiredFieldValidator runat="server" ID="req1" ControlToValidate="dataApprovalBy"
                        ErrorMessage="Required" ValidationGroup="Entity" />
                    <data:InvoiceCheckingUserDataSource ID="ApprovalByUserDataSource" runat="server"
                        SelectMethod="GetPaged">
                        <Parameters>
                            <data:CustomParameter Name="WhereClause" Value="Roles LIKE '%Approval%'" ConvertEmptyStringToNull="false" />
                        </Parameters>
                    </data:InvoiceCheckingUserDataSource>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</asp:FormView>
